#include <iostream>

using namespace std;

void cout_arr(int arr[], int size = 10);
static const int CALLBACK_THREAD_NUMS = 16;
int main()
{
    std::array<std::atomic<int>, CALLBACK_THREAD_NUMS> _thread_status;
    // 输出数组所有的值
    for (int i = 0; i < _thread_status.size(); i++)
    {
        cout << "arr[" << i << "]=" << _thread_status[i] << ",";
    }
    // 换行
    cout << endl;
    _thread_status[0] = -2;
    // 输出数组所有的值
    for (int i = 0; i < _thread_status.size(); i++)
    {
        cout << "arr[" << i << "]=" << _thread_status[i] << ",";
    }
    // 换行
    cout << endl;

    _thread_status[17] = -1;
    _thread_status[18] = -1;
    _thread_status[19] = -1;
    // 输出数组所有的值
    for (int i = 0; i < _thread_status.size(); i++)
    {
        cout << "arr[" << i << "]=" << _thread_status[i] << ",";
    }
    // 换行
    cout << endl;

    _thread_status[15] = -2;
    // 输出数组所有的值
    for (int i = 0; i < _thread_status.size(); i++)
    {
        cout << "arr[" << i << "]=" << _thread_status[i] << ",";
    }
    // 换行
    cout << endl;

    // 定义是一个数组
    int arr[10] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
    // int arr[10];
    // 定义的是一个指针
    int *p;
    // 定义的是一个引用
    int &ref1 = arr[0];
    int &ref2 = arr[1];
    // 输出数组所有的值
    cout_arr(arr);

    ref2 = 100;
    cout_arr(arr);
    arr[1] = 200;
    cout_arr(arr);

    uint64_t group_id = -1; // 64位无符号整数，最大值是2^64-1
    cout << "group_id=" << group_id << endl;
    uint64_t group_id1 = -2; // 64位无符号整数，最大值是2^64-1
    cout << "group_id1=" << group_id1 << endl;
    uint64_t group_id2 = 0;
    cout << "group_id2=" << group_id2 << endl;
    return 0;
}

void cout_arr(int arr[], int size)
{
    cout << "arr=" << arr << " size=[" << sizeof(arr) << "] data = [";
    for (int i = 0; i < size; i++)
    {
        cout << "arr[" << i << "]=" << arr[i] << ",";
    }
    cout << " ]" << endl;
}

